package com.th.mapper;

import com.th.SqlProvider.EmployyeMapperProvider;
import com.th.bean.Employye;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Service;

import java.util.List;


@Mapper
public interface EmployyeMapper {
    @Select("select * from employee")
    List<Employye> findAll();
    @Delete("delete from employee where id=#{id}")
    int delete(Integer id);

    @Insert("insert into employee (age,name,sex,address) values (#{age},#{name},#{sex},#{address})")
    int insert(Employye employye);
    @UpdateProvider(type = EmployyeMapperProvider.class,method = "update")
    int update(Employye employye);
}
